package com.zl.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zl.dao.UserDao;
import com.zl.weixin.entity.UserClient;

/**   
* @Title: UserService.java 
* @Package com.zl.service 
* @Description: 用户 
* @author chxl   
* @date 2015年8月12日 下午2:09:05 
* @version V1.0   
*/
@Service
public class UserService {
	
	@Autowired
	private UserDao userDao;
	
	/**
	 * 注册
	 */
	public void register(UserClient user){
		String id = user.getOpenid();
		UserClient userClient = userDao.getUserById(id);
		if(userClient==null){
			userDao.insertUser(user);
		}
	}
}
